Notice that the invariant and other tests refer to an implied balance field, even though an interface can't define fields.
注意,虽然接口不能定义字段,但不变条件测试和其他测试引用了一个隐含的余额字段。
For example, the default invariant condition for a field requires the field to be non-null.
例如,字段的默认不变条件要求字段不能为空。
(The class invariant above was effectively a field-invariant specification!)
(上面的类不变条件实际上就是一个字段不变条件的规范!)
应用推荐